
#include <avr/io.h>
#include "Connection.h"

void init_USART(void){
// Enable receiver and transmitter
UCSR0B = (1<<RXEN0)|(1<<TXEN0);

// Set frame format to 8 data bits, no parity, 1 stop bit
UCSR0C = (0<<USBS0)|(1<<UCSZ01)|(1<<UCSZ00);

// Set baud rate
UBRR0H = (uint8_t)(BAUD_PRESCALE>>8);
UBRR0L = (uint8_t)BAUD_PRESCALE;
}
